// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'workorderid',
        footer: "Foots",
        cnName: '工单管理',
        name: 'ysl_workorder',
        url: "/ysl_workorder/",
        sortName: "workorderid"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"codeid":"","workorder_type":"","product_data":"","proces_sroute":"","production_line":"","work_status":"","start_time":"","end_time":"","number":"","process_progress":"","isorskip":"","attachment":"","workorder_desc":"","source_worker":""};
    const editFormOptions = [[{"dataKey":"ysl_Material_Code","data":[],"title":"编码","required":true,"field":"codeid"}],
                              [{"dataKey":"工单类型(正,异)","data":[],"title":"类型","field":"workorder_type","type":"select"}],
                              [{"dataKey":"产品主数据","data":[],"title":"产品主数据","required":true,"field":"product_data","type":"select"}],
                              [{"dataKey":"新工艺字典","data":[],"title":"工艺路线","required":true,"field":"proces_sroute","type":"select"}],
                              [{"dataKey":"新产线字典","data":[],"title":"产线","required":true,"field":"production_line","type":"select"}],
                              [{"dataKey":"工单类型(正,异)","data":[],"title":"状态","required":true,"field":"work_status","type":"select"}],
                              [{"title":"计划开始日期","required":true,"field":"start_time","type":"date"}],
                              [{"title":"计划结束日期","required":true,"field":"end_time","type":"date"}],
                              [{"title":"数量","field":"number","type":"number"}],
                              [{"title":"工序进度","field":"process_progress"}],
                              [{"dataKey":"是否跳过","data":[],"title":"是否跳过工序","field":"isorskip","type":"select"}],
                              [{"title":"附件上传","field":"attachment"}],
                              [{"title":"备注","field":"workorder_desc","type":"textarea"}],
                              [{"title":"员工单号","required":true,"field":"source_worker"}]];
    const searchFormFields = {"codeid":"","workorder_type":"","product_data":"","proces_sroute":"","work_status":"","start_time":"","end_time":"","number":""};
    const searchFormOptions = [[{"dataKey":"ysl_Material_Code","data":[],"title":"编码","field":"codeid"},{"dataKey":"工单类型(正,异)","data":[],"title":"类型","field":"workorder_type"},{"dataKey":"产品主数据","data":[],"title":"产品主数据","field":"product_data","type":"select"},{"dataKey":"新工艺字典","data":[],"title":"工艺路线","field":"proces_sroute","type":"select"},{"dataKey":"工单类型(正,异)","data":[],"title":"状态","field":"work_status","type":"number"},{"title":"计划开始日期","field":"start_time","type":"date"},{"title":"计划结束日期","field":"end_time","type":"date"},{"title":"数量","field":"number","type":"number"}]];
    const columns = [{field:'workorderid',title:'工单主键',type:'bigint',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'codeid',title:'编码',type:'string',bind:{ key:'ysl_Material_Code',data:[]},sort:true,width:180,require:true,align:'left'},
                       {field:'workorder_type',title:'类型',type:'string',bind:{ key:'工单类型(正,异)',data:[]},sort:true,width:180,align:'left'},
                       {field:'product_data',title:'产品主数据',type:'string',bind:{ key:'产品主数据',data:[]},width:180,require:true,align:'left'},
                       {field:'proces_sroute',title:'工艺路线',type:'string',bind:{ key:'新工艺字典',data:[]},width:180,require:true,align:'left'},
                       {field:'production_line',title:'产线',type:'string',bind:{ key:'新产线字典',data:[]},width:180,require:true,align:'left'},
                       {field:'work_status',title:'状态',type:'int',bind:{ key:'工单类型(正,异)',data:[]},width:110,require:true,align:'left'},
                       {field:'start_time',title:'计划开始日期',type:'datetime',sort:true,width:150,require:true,align:'left'},
                       {field:'end_time',title:'计划结束日期',type:'datetime',sort:true,width:150,require:true,align:'left'},
                       {field:'number',title:'数量',type:'int',sort:true,width:110,align:'left'},
                       {field:'process_progress',title:'工序进度',type:'string',width:180,align:'left'},
                       {field:'isorskip',title:'是否跳过工序',type:'int',bind:{ key:'是否跳过',data:[]},width:110,align:'left'},
                       {field:'attachment',title:'附件上传',type:'string',width:180,align:'left'},
                       {field:'workorder_desc',title:'备注',type:'string',width:180,align:'left'},
                       {field:'source_worker',title:'员工单号',type:'string',width:180,require:true,align:'left'},
                       {field:'fild1',title:'备用字段1',type:'string',width:180,hidden:true,align:'left'},
                       {field:'fild2',title:'备用字段2',type:'string',width:180,hidden:true,align:'left'},
                       {field:'fild3',title:'备用字段3',type:'string',width:180,hidden:true,align:'left'},
                       {field:'fild4',title:'备用字段4',type:'string',width:180,hidden:true,align:'left'},
                       {field:'fild5',title:'备用字段5',type:'string',width:180,hidden:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}